<?php

/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator          |
    |              on 2018-07-17 15:20:01              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
namespace MmqmMarket\controller\mobile;

defined("IN_IA") || die("Access Denied");
class Index extends \MmqmMarket\controller\BaseController
{
    public function __construct($Site, $arguments)
    {
        parent::__construct($Site, $arguments);
        method_exists($this, $GLOBALS["_GPC"]["ac"]) && ($this->{$GLOBALS["_GPC"]["ac"]}() && die || die);
        $GLOBALS["PARAMS"] = array("settings" => pdo_get($this->table_setting, array("weid" => $GLOBALS["_W"]["uniacid"])), "slides" => pdo_getall($this->table_ad, array("uniacid" => $GLOBALS["_W"]["uniacid"], "position" => 3, "status" => 1)));
        include $this->template();
    }
    private function tabulation()
    {
    }
    private function nearestFour()
    {
        \MmqmMarket\model\Util::createMySQLUserDefineDistanceFunction();
        $all = \MmqmMarket\model\SQL::all("\nSELECT *, `GETDISTANCE`(:lat, :lng, `A`.`lat`, `A`.`lng`) AS `Distance`\nFROM `@#__M_area` AS `A`\nWHERE 1 = 1\nORDER BY `Distance` ASC\nLIMIT 4;\n", array(":lat" => $GLOBALS["_GPC"]["point"]["lat"], ":lng" => $GLOBALS["_GPC"]["point"]["lng"]));
        die(json_encode(array("market" => $all)));
    }
}